import {h, init} from 'snabbdom'

const patch = init([])

let vnode = h('div#app', [
    h('h1', 'hello'),
    h('p', 'p标签')
])

let app = document.querySelector('#app')

let oldvnode = patch(app, vnode)

setTimeout(() => {
    vnode = h('div#app', [
        h('h1', 'hello world'),
        h('p', 'hello p')
    ])
    // patch(oldvnode, vnode)

    // 清空

    patch(oldvnode, h('!'))
}, 2000)
